<template>
  <div>
    <div class="tool">
      <div v-if="title" class="tool-t">
        <div>{{ title }}</div>
        <div>
          <slot name="title" />
        </div>
      </div>
      <div>
        <slot />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: ''
    }
  }
}
</script>

<style lang="scss" scoped>
.tool {
  box-shadow: 0 0 8px 0 #057595;
  border-radius: 8px;

  &-t {
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    align-items: center;
    height: 40px;
    background: rgba(2, 27, 43, 1);
    font-size: 14px;
    font-weight: 800;
    color: #fefefe;
    border-radius: 8px 8px 0 0;
    word-break: keep-all;
  }
}
</style>
